package cn.iocoder.yudao.module.wms.controller.admin.customerclassify.vo;

import cn.iocoder.yudao.module.wms.dal.dataobject.inventoryclassify.InventoryClassifyDO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 客户分类 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CustomerClassifyRespVO implements VO {

    @Schema(description = "分类id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18243")
    private Long id;

    @Schema(description = "分类编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("分类编码")
    private String code;

    @Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("分类名称")
    private String name;

    @Schema(description = "父分类id", example = "16041")
    @Trans(type = TransType.SIMPLE, target = InventoryClassifyDO.class, fields = "name", ref = "parentName")
    private Long parentId;

    @Schema(description = "上级分类名称")
    @ExcelProperty("上级分类名称")
    private String parentName;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}